﻿import request from '/@/utils/request';
enum Api {
    AddBusGoodAttribute = '/api/busGoodAttribute/add',
    DeleteBusGoodAttribute = '/api/busGoodAttribute/delete',
    UpdateBusGoodAttribute = '/api/busGoodAttribute/update',
    PageBusGoodAttribute = '/api/busGoodAttribute/page',
    GetBusGoodsDropdown = '/api/busGoodAttribute/BusGoodsDropdown',
    GetBusAttributeDropdown = '/api/busGoodAttribute/BusAttributeDropdown',
    GetBusAttributeDropdownQBM =  '/api/busGoodAttribute/BusAttributeDropdown_QBM',
    BusGoodsAttributeDropdown_Value =  '/api/busGoodAttribute/BusGoodsAttributeDropdown_Value'
}

// 增加商品属性
export const addBusGoodAttribute = (params?: any) =>
    request({
        url: Api.AddBusGoodAttribute,
        method: 'post',
        data: params,
    });

// 删除商品属性
export const deleteBusGoodAttribute = (params?: any) =>
    request({
        url: Api.DeleteBusGoodAttribute,
        method: 'post',
        data: params,
    });

// 编辑商品属性
export const updateBusGoodAttribute = (params?: any) =>
    request({
        url: Api.UpdateBusGoodAttribute,
        method: 'post',
        data: params,
    });

// 分页查询商品属性
export const pageBusGoodAttribute = (params?: any) =>
    request({
        url: Api.PageBusGoodAttribute,
        method: 'post',
        data: params,
    });

export const getBusGoodsDropdown = () =>
    request({
        url: Api.GetBusGoodsDropdown,
        method: 'get'
    });
export const getBusAttributeDropdownF = (param?: any) =>
    request({
        url: Api.GetBusAttributeDropdownQBM,
        method: 'get',
        data: param
    });
    //BusGoodsAttributeDropdown_Value
export const BusGoodsAttributeDropdownValue = (param?: any) =>
    request({
        url: Api.BusGoodsAttributeDropdown_Value,
        method: 'get',
        data: param
    });

